#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File    :   eval_param.py
@Time    :   2020/11/25
@Author  :   wenke wang
@Version :   1.0
@Desc    :   Framingham10年风险评估参数
'''

# here put the import lib
from decimal import Decimal

class FraminghamEvalParam():
    """
    Framingham10年风险评估参数
    """
    def __init__(self, age, gender, smoking, sbp, treat, tc, hdlc):
        self.__age = int(age)
        if self.__age < 20 or self.__age > 79:
            raise ValueError("the age out of range[20,79].")        
        self.__gender = gender
        self.__smoking = int(smoking)
        self.__sbp = int(sbp)
        self.__treat = int(treat)
        self.__tc = Decimal(str(tc))
        self.__hdlc = Decimal(str(hdlc))

    @property
    def age(self):
        return self.__age    
    @age.setter
    def age(self, val):
        self.__age = int(val)
        if self.__age < 20 or self.__age > 79:
            raise ValueError("the age out of range[20,79].")

    @property
    def gender(self):
        return self.__gender
    @gender.setter
    def gender(self, val):
        self.__gender = val
    
    @property
    def smoking(self):
        return self.__smoking
    @smoking.setter
    def smoking(self, val):
        self.__smoking = int(val)

    @property
    def sbp(self):
        return self.__sbp
    @sbp.setter
    def sbp(self, val):
        self.__sbp = int(val)

    @property
    def treat(self):
        return self.__treat
    @treat.setter
    def treat(self, val):
        self.__treat = int(val)
    
    @property
    def tc(self):
        return self.__tc
    @tc.setter
    def tc(self, val):
        self.__tc = Decimal(str(val))
    
    @property
    def hdlc(self):
        return self.__hdlc
    @hdlc.setter
    def hdlc(self, val):
        self.__hdlc = Decimal(str(val))
        
        